-
-
Notifications
You must be signed in to change notification settings - Fork 681
Improve auto-fix for vue/define-macros-order
rule
#1863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -232,13 +232,12 @@ function create(context) { | |||
const targetComment = sourceCode.getTokenAfter(beforeTargetToken, { | |||
includeComments: true | |||
}) | |||
const textSpace = getTextBetweenTokens(beforeTargetToken, targetComment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thing fixes these newlines https://github.com/vuejs/eslint-plugin-vue/pull/1861/files#diff-6ebdd3c21be70e29ce94a2f399884fd220d4fe9bba358ade66b0bceb325d3102L158
Before we took space before the target token and added it after the moving token.
Now we take space after the target token and added it after the moving token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
vue/define-macros-order
rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think we shouldn't add options for auto-fix. Because the aims of the rule is to check. |
In PR #1861 was decided to create separate PR for these improvements
There are two fixes here:
a();b() -> b()a();